package com.hzcx.app.simplechat.ui.group;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.hzcx.app.simplechat.R;
import com.hzcx.app.simplechat.base.BaseActivity;
import com.hzcx.app.simplechat.ui.group.bean.GroupInfoBean;
import com.hzcx.app.simplechat.ui.setting.FeedBackActivity;
import com.hzcx.app.simplechat.ui.setting.ReportActivity;

import butterknife.BindView;
import butterknife.OnClick;

public class ChatGroupComplaintActivity extends BaseActivity {

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.iv_title_right)
    ImageView ivTitleRight;
    @BindView(R.id.tv_title_right)
    TextView tvTitleRight;

    static public String ChatGroupComplaintActivityGroupInfoBean = "ChatGroupComplaintActivityGroupInfoBean";
    private GroupInfoBean groupInfoBean;


    @Override
    public int getLayout() {
        return R.layout.activity_chat_group_complaint;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void initView() {
        tvTitle.setText("投诉举报");

        groupInfoBean = (GroupInfoBean) getIntent().getSerializableExtra(ChatGroupComplaintActivityGroupInfoBean);
    }

    @Override
    public void initData() {

    }

    @OnClick({R.id.setting_complaint_0, R.id.setting_complaint_1, R.id.setting_complaint_2, R.id.setting_complaint_3, R.id.setting_complaint_4, R.id.setting_complaint_5, R.id.setting_complaint_6})
    public void viewOnClick(View view) {
        String complaint = ((TextView)view).getText().toString();

        Log.i("ChatGroupComplaint", "Complaint Reason: " + complaint);

        Intent intent = new Intent(this, FeedBackActivity.class);
        intent.putExtra(FeedBackActivity.FeedBackActivityReasonKey, complaint);
        intent.putExtra(FeedBackActivity.GroupInfoBeanKeyGroupID, groupInfoBean.getGroup_id());
        startActivity(intent);
    }
}